package juhouse.glb.photo.dao;

import hzjbbis.framework.util.dao.JbbisDao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class ErrPhotoDao extends JbbisDao{

	public void newErrPhoto(String photoUrl,String photoName,String ip)
	{
		PreparedStatement ps = null;
		Connection conn = null;
		StringBuffer sqlString = new StringBuffer();
		sqlString.append("insert into errPhoto (photoUrl,photoName,ip,photoTime)values(?,?,?,getDate())");
		try
		{
			conn = this.getConnection();
			ps = conn.prepareStatement(sqlString.toString());
			ps.setString(1,photoUrl);
			ps.setString(2,photoName);
			ps.setString(3,ip);
			ps.executeUpdate();
			conn.commit();
		}catch(SQLException e){
        	System.out.print("\nnewErrPhoto:"+e.toString());
        }finally{
        	this.close(conn,ps);
        }
	}
}
